
// headers from this project
#include "singleton.hpp"

// headers from standard libraries
#include <iostream>

DesignPatterns::singleton* 
DesignPatterns::singleton::m_instance = 0;

DesignPatterns::singleton* 
DesignPatterns::singleton::get_instance()
{
	if (! m_instance) {
		m_instance = new singleton;
	}
	return m_instance;
}

void DesignPatterns::
singleton::do_something()
{
	std::cout << "Method of the singleton class" << std::endl;
}

DesignPatterns::
singleton::singleton()
{
}
